﻿using Hotel_Project.Tools.MySqlData_Helps;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Hotel_Project.Tools.MySqlBrushData_Helps
{
    /// <summary>
    /// 异步使MySql数据库绑定DataGridView控件类
    /// </summary>
    internal class MySqlBrushDataGridView
    {
        /// <summary>
        ///  MySql数据库绑定DataGridView控件方法
        /// </summary>
        /// <param name="mySqlConnand">建立连接sql语句</param>
        /// <param name="Sql">Sql语句</param>
        public async static void Brush(DataGridView d,string sqlConnand,string sql)
        {
            MySqlDataTable dt = new MySqlDataTable();
            d.DataSource = await dt.GetDataTable(sqlConnand, sql);
        }
    }
}
